<table width ='100%'>
	<tr>
		<td>List of by<input type='text' name='txt_keyword' value='keyword'/></td>
		<td align='right'>
			<select name='cbo_active'>
				<option value='All'>Tất cả</Option>
				<option value='1'>Hiện</Option>
				<option value='0'>Ẩn</Option>
			</select>
		</td>
	</tr>
</table>
<br/>
<br/>
<?php 
$result = GetCount('tbladmin'); //query đếm số bản ghi
?>
<div id="data">
	<nav role="list">
		<ul>
			<?php
			include_once('include/role_list.php');	
			$result = getList('',"LIMIT $start, $display")
			?>

			<table width='100%' class='tbl_list' cellpadding='0' cellspacing='0'>
				<tr id='content'>
					<th><input type='checkbox' name='chk_all' id='chk_all' /></th>
					<th hidden >AdminID</th>
					<th>UserName</th>
					<th>Full Name</th>
					<th>Adress</th>
					<th>Email</th>
					<th>Phone</th>
					<th>Level</th>
					<th>isAcTive</th>
					<th colspan=2>Process</th>
				</tr>
				<?php
					$stt=0;
					while($row = mysql_fetch_array($result)){
						$stt++;
				?>
				<tr id='list' style="background-color:<?php if($stt%2==1) echo '#fff;'; else echo '#F5F5F5;' ?>">
					<td width ="50" align='center'><input type='checkbox' name="chk" id="chk" value="<?php echo $row['AdminID'];?>"/></td>
					<td hidden Width ="50" align='center'><?php echo $row['AdminID'] ;?></td>
					<td Width ="50" align='center'><?php echo $row['AUserName'] ;?></td>
					<td width ="200" align='center'><?php echo $row['AFullName'] ;?></td>
					<td width ="200" align='center'><?php echo $row['AAddress'] ;?></td>
					<td width ="250" align='center'><?php echo $row['AEmail'] ;?></td>
					<td width ="250" align='center'><?php echo $row['APhone'] ;?></td>
					<td align='center'>
						<?php
							if($row['Level']==0) echo"Superadmin";
							elseif($row['Level']==1) echo"Manager";
							else echo"Member";
						?>
					</td>
					<td width="100" align='center'><a href="index.php?page=<?php echo $page;?>&task=active&id=<?php echo $row['AdminID']; ?>&start=<?php if(!isset($_REQUEST['start'])) echo '0'; else echo $_REQUEST['start']; ?>">
					<?php if($row['isActive']==1)echo 'Is active'; elseif($row['isActive']==0)echo 'Not active';?></a></td>
					
					<td align='center'><a href="index.php?page=<?php echo $page;?>&task=edit&id=<?php echo $row['AdminID'];?>"><img title="Edit <?php echo $row['AFullName']; ?>" alt="" src="images/edit.png" /></a>&nbsp;&nbsp;&nbsp;&nbsp;
					<a href="index.php?page=<?php echo $page;?>&task=delete&id=<?php echo $row['AdminID'];?>" onclick="return confirm('Chắc chắn xóa?');" ><img title="Delete <?php echo $row['AFullName']; ?>" alt="" src="images/delete.png" /></a></td>
				</tr>
				<?php } ?>
			</table>
		</ul>
	</nav>
	<?php include('include/role_page.php');?>
</div> 